<?php
defined('_JEXEC') or die('Restricted access');
 
class modUrksPostCommitWebhookHelper 
{
    public static function getRevisions($params) 
    {
        $db = JFactory::getDBO();
		 
        $query = '
            SELECT
                *
            FROM
                #__UrksPCW_revisions
            WHERE 
            	`project_name` = '.$db->quote($params->get('project')).'
            ORDER BY
                `datetime` DESC
            LIMIT
                0, '.( (int) $params->get('count') )
        ;
		
		$db->setQuery($query);
        return $db->loadObjectList();
    }
}
?>